<template>
	<view class="title" :style="cusStyle">
		<view class="img left">
			<image mode="heightFix" :src="HTTP_IMG_UTL+'detailTitle.png'"></image>
		</view>
		<view class="text">
			{{ $t(title) }}
		</view>
		<view class="img right">
			<image mode="heightFix" :src="HTTP_IMG_UTL+'detailTitle.png'"></image>
		</view>
	</view>
</template>

<script>
	import {
		IMAGE_URL,
		HTTP_IMG_UTL
	} from "@/config/app";
	export default {
		props: {
			title: {
				type: String,
				default: '标题',
				required: false,
			},
			cusStyle: {
				type: String,
				default: '',
			}
		},
		data() {
			return {
				HTTP_IMG_UTL
			}
		}
	}
</script>

<style lang="scss" scoped>
	.title {
		display: flex;
		align-items: center;
		padding-top: 20rpx;
		justify-content: center;
		overflow: hidden;

		.img {
			flex: 1;
			transform: translateY(6rpx);
			image {
				height: 34rpx;
				width: 100%;
			}

			&.right {
				transform: rotate(180deg);
			}
		}

		.text {
			flex: none;
			padding: 0 20rpx;
			text-align: center;
			font-size: 35rpx;
		}
	}
</style>